//商机分类下拉框指令
define('businessClassSelectDirective', ['angular'], function (angular) {
    var m = angular.module('directives');
    m.directive('businessClassSelect', ['$filter','failureReasonServers',function ($filter,failureReasonServers) {
        return {
            restrict: 'AE',
            templateUrl: 'js/templates/businessClassSelect.html',
            replace: true,
            scope:{
                currentClass:'='
            },
            controller:['$scope','$rootScope',function($scope,$rootScope){
                failureReasonServers.getFailureReason().then(function (data) {
                    $scope.businessClassList = data;
                });
            }]
        };
    }]);
});